<%-- 
    Document   : add
    Created on : Jan 9, 2012, 6:44:17 PM
    Author     : subwiz
--%>

<%@page contentType="text/html" pageEncoding="MacRoman"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=MacRoman">
        <title>Web Tester: Add Page</title>
    </head>
    <body>
        <h1>Web Tester: Add Content</h1>
        
        <p>The HTML content added will be available for 24 hours in a Web-accessible Url.</p>
        
        <c:if test="${not empty errors}">
            <ul style="color:red">
                <c:forEach items="${errors}" var="error">
                    <li><c:out value="${error}"/></li>
                </c:forEach>
            </ul>
        </c:if>
        
        <c:if test="${not empty messages}">
            <ul style="color:green">
                <c:forEach items="${messages}" var="msg">
                    <li><c:out value="${msg}" escapeXml="false"/></li>
                </c:forEach>
            </ul>
        </c:if>
        
        <form action="/add" method="post">
            Url:<br/>
            <input type="text" name="url" value="<c:out value='${url}' escapeXml='true'/>"/> (3-5 alphanumeric characters) <br/>
            HTML:<br/>
            <textarea name="body" rows="25" cols="100"><c:out value='${body}' escapeXml='true'/></textarea><br/>
            <input type="submit" value="Add / Update"/>
        </form>
        <footer>
            <p>This is a <a href="http://www.wiztools.org/">WizTools.org</a> project.</p>
        </footer>
    </body>
</html>
